from model import ShuffleNetV1

# net = ShuffleNetV1(num_classes=12) # 注意：模型内部传参数和不传参数，输出的结果是不一样的

net = ShuffleNetV1(group=3, n_class=12, model_size='1.0x')
# print(model)

# test_data = torch.rand(5, 3, 224, 224)
# test_outputs = model(test_data)
# print(test_outputs.size())


# net = MobileNetV2(num_classes=12)
# 计算网络参数
total = sum([param.nelement() for param in net.parameters()])
# 精确地计算：1MB=1024KB=1048576字节
print(total)
print('Number of parameter: % .4fM' % (total / 1e6))



